package com.example.myapplication.adapter;

import android.content.Context;
import android.view.ContextMenu;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.example.myapplication.R;
import com.example.myapplication.bean.Mates;

import java.util.List;


/**
 * Created by Administrator on 2020/11/26.
 */

public class Myadapter2 extends BaseAdapter{
    private Context context;

    private TextView matesmt;
    private List<Mates.ResultBean.MatesBean> fh;

    public Myadapter2(Context context, List<Mates.ResultBean.MatesBean> fh) {
        this.context = context;
        this.fh = fh;
    }

    @Override
    public int getCount() {
        return fh.size();
    }

    @Override
    public Object getItem(int i) {
        return fh.get(i);
    }

    @Override
    public long getItemId(int i) {
        return i;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        view = View.inflate(context, R.layout.fragment22,null);
        matesmt = view.findViewById(R.id.mt_mates_two);
        matesmt.setText(fh.get(i).getNc()+"");


        return view;

    }
}